﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MainCont.Master" AutoEventWireup="true"
    CodeBehind="Optinion.aspx.cs" Inherits="Thksoft.BusinessExpansion.Business.Optinion" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script src="/Scripts/jquery-1.7.min.js" type="text/javascript"></script>
    <script type="text/javascript">
        var option = {};
        option.Area = ["850px", "440px"];
        option.Title = "1";
        option.CancelCallback = function (index, layero) {
            //刷新页面
            location.href = location.href;
        };
        function FORM_INSERT() {
            option.Title="新增意见"
            option.Url = "/BusinessExpansion/Business/OptinionEdit.aspx?IF_EDIT=FALSE";
            top.MessageBox.Load(option);
        }
        function FORM_EDIT(id) {
            option.Title="编辑意见"
            option.Url = "/BusinessExpansion/Business/OptinionEdit.aspx?IF_EDIT=TRUE&ID=" + id;
            top.MessageBox.Load(option);
        }
        function FORM_UPDATE() {
            var bbq = $('.cont_list input:checkbox:checked').length;
            if (bbq == 0) {
                top.MessageBox.Alert("请选择需要修改的行");
                return;
            }
            if (bbq > 1) {
                top.MessageBox.Alert("修改不能多选");
                return;
            }
            var option = {};
            option.Title="编辑意见"
            option.Type = "confirm";
            option.YesCallback = function (index, dom) {
                top.layer.close(index);
                $("#<%=btnEdit.ClientID %>").click();
            };
            option.Msg = "确定修改?";
            top.MessageBox.Show(option);
        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table id="mytable" border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td>
                <div class="main_show_show">
                    <table border="0" cellpadding="0" cellspacing="0" width="100%" class="table">
                        <tr>
                            <td style="width: 7%; text-align: right; padding-right: 5px;">
                                <span>意见内容：</span>
                            </td>
                            <td align="left" colspan="2" style="padding-left: 10px;">
                                <asp:TextBox ID="txtKey" CssClass="txt_input" Width="150px" TabIndex="3" runat="server"
                                    Height="19px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2" align="center">
                                <asp:Button ID="btnSelect" runat="server" Text="查询" CssClass="bt_css_s" OnClick="btnSelect_Click" />&nbsp;
                                <asp:Button ID="btnInsert" runat="server" Text="新增" CssClass="bt_css_s" OnClick="btnInsert_Click" />&nbsp;
                                <input type="button" value="编辑" class="bt_css_s" onclick="FORM_UPDATE();" />
                                <asp:Button ID="btnEdit" runat="server" CssClass="hide" OnClick="BtnEdit_Click" Text="编辑" />&nbsp;
                                <asp:Button ID="btnDelele" runat="server" CssClass="bt_css_s" Text="删除" OnClick="btnDelele_Click"
                                    OnClientClick="return confirm('是否删除?');" />
                            </td>
                        </tr>
                    </table>
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <div class="main_show_show">
                    <asp:ScriptManager ID="ScriptManagers" runat="server" EnablePageMethods="True" EnableScriptGlobalization="True"
                        EnableScriptLocalization="True">
                    </asp:ScriptManager>
                    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                        <ContentTemplate>
                            <asp:GridView ID="grvShow" runat="server" AutoGenerateColumns="False" CssClass="cont_list zebra"
                                Width="100%" EmptyDataText="没有查找到您要的数据" AllowSorting="True" OnSorting="grvShow_Sorting">
                                <Columns>
                                    <asp:TemplateField>
                                        <HeaderTemplate>
                                            <asp:CheckBox ID="chkSelectAll" runat="server" Onclick="GetAllCheckBox(this)" />
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <asp:CheckBox ID="chkSelectId" runat="server" ToolTip='<%#Eval("N_OPIN_ID")%>' />
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="编号" DataField="N_OPIN_ID" SortExpression="N_OPIN_ID" />
                                    <asp:BoundField HeaderText="意见内容" DataField="C_OPIN_NAME" SortExpression="C_OPIN_NAME" />
                                    <asp:TemplateField HeaderText="是否启用">
                                        <ItemTemplate>
                                            <%#(Convert.ToDecimal((Eval("N_STATE")))==0?"启用":"禁用")%>
                                        </ItemTemplate>
                                    </asp:TemplateField>
                                    <asp:BoundField HeaderText="创建时间" DataField="D_OPIN_TIME" SortExpression="D_OPIN_TIME" />
                                </Columns>
                            </asp:GridView>
                        </ContentTemplate>
                    </asp:UpdatePanel>
                    <uc1:Pagination ID="PageIng" runat="server" OnDataBinding="PageIng_DataBinding" Visible="false" />
                </div>
            </td>
        </tr>
    </table>
</asp:Content>